import React,{ Component } from 'react'
import { connect } from 'react-redux'
import CarUI from './CarUI'


class Car extends Component {
  render() {
    return (
      <CarUI {...this.props}></CarUI>
    )
  }
}


const mapStateToProps = (state) => {
  // return 的对象是给到UI组件的 props
  return {
    title: state.CarReducer.title
  }
}

const mapDispatchToProps = (dispatch) => {
  return {
    onClick: () => {
      console.log(111);
    }
  }
};


export default connect(mapStateToProps,mapDispatchToProps)(Car)
